package com.hy.mydesktop.client.component.meta;

import java.util.Map;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.extjs.gxt.ui.client.data.BaseModel;

/**
 * 
 * <ul>
 * <li>开发作者：花宏宇</li>
 * <li>设计日期：2010-10-9；时间：上午11:45:26</li>
 * <li>类型名称：GridColumnConfigModel</li>
 * <li>设计目的：用于Rpc调用中，对于Grid的ColumnConfig对象，进行ModelData的封装</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
@Entity
@Table(name="t_GridColumnConfigModel")
public class GridColumnConfigModel extends BaseModel{
	
	public GridColumnConfigModel() {
		super();
	}
	public GridColumnConfigModel(String id,String header,int width) {
		super();
		this.setId(id);
		this.setHeader(header);
		this.setWidth(width);
		this.setHidden(false);
		this.setDate(false);
	}
	public GridColumnConfigModel(String id,String header,int width,boolean hidden) {
		super();
		this.setId(id);
		this.setHeader(header);
		this.setWidth(width);
		this.setHidden(hidden);
	}
	
	public GridColumnConfigModel(boolean date,String id,String header,int width) {
		super();
		this.setId(id);
		this.setHeader(header);
		this.setWidth(width);
		this.setDate(date);
	}
	
	public GridColumnConfigModel(boolean combox,boolean date,String id,String header,int width) {
		super();
		this.setId(id);
		this.setHeader(header);
		this.setWidth(width);
		this.setDate(date);
		this.setCombox(combox);
	}
	
	public GridColumnConfigModel(String id,String header) {
		super();
		this.setId(id);
		this.setHeader(header);
		this.setWidth(100);
		this.setHidden(false);
		this.setDate(false);
	}
	public GridColumnConfigModel(Map<String, Object> properties) {
		super(properties);
	}
	/**
	 * <ul>
	 * <li>开发作者：花宏宇</li>
	 * <li>设计日期：2010-10-9；时间：上午11:51:07</li>
	 * <li>字段类型：long；字段名称：serialVersionUID</li>
	 * <li>设计目的：</li>
	 * </ul>
	 * <ul>
	 * <b>修订编号：</b>
	 * <li>修订日期：</li>
	 * <li>修订作者：</li>
	 * <li>修订原因：</li>
	 * <li>修订内容：</li>
	 * </ul>
	 */
	private static final long serialVersionUID = -1096084812536597563L;
	@Id
	public String getId() {
		return super.get("id");
	}
	public void setId(String id) {
		super.set("id", id);
	}
	
	public boolean getCombox() {
		return super.get("combox",false);
	}
	public void setCombox(boolean combox) {
		super.set("combox", combox);
	}
	
	public String getHeader() {
		return super.get("header");
	}
	public void setHeader(String header) {
		super.set("header", header);
	}
	public boolean getHidden() {
		return super.get("hidden");
	}
	public void setHidden(boolean hidden) {
		super.set("hidden", hidden);
	}
	
	public String isDate() {
		return super.get("date");
	}
	public boolean getDate() {
		return super.get("date");
	}
	public void setDate(boolean date) {
		super.set("date", date);
	}
	
	public Integer getWidth() {
		return super.get("width");
	}
	
	public void setWidth(int width) {
		super.set("width", width);
	}
	
}
